package com.wootion.dizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 资源表信息
 */
@Data
@TableName(value = "resources")
@ApiModel(value = "资源表信息")
@NoArgsConstructor
public class Resources {
    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键id")
    private String id;

    @ApiModelProperty(value = "资源数据的时间")
    private String time;

    @ApiModelProperty(value = "资源数据的日期")
    private String date;

    @ApiModelProperty(value = "资源数据的值")
    private String value;

    @ApiModelProperty(value = "关联的配置id")
    private String resId;

    public Resources(Temporary temporary,String configId) {
        this.id = temporary.getId();
        this.time = temporary.getTime();
        this.date = temporary.getDate();;
        this.value = temporary.getValue();;
        this.resId = configId;
    }

}
